﻿@using MealBooking.Core.Models.Orders;
@model List<Order>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<!--Navbar-->
<div data-role="navbar" data-iconpos="left">
    <div class="float-right">
        <div data-role="controlgroup" data-type="horizontal" data-inset="true" data-mini="true"
            data-theme="c">
            <a href="@Url.Action("TodayOrder", "Order")">Today Order</a> <a href="@Url.Action("HistoryOrder", "Order")">
                History Orders</a>
        </div>
    </div>
</div>
<!--Navbar End-->
<ul data-role="listview" data-inset="true" data-mini="true">
    @{
        var orders = Model;
        if (orders == null || orders.Count == 0)
        {
        <li data-role="list-divider"></li>
        <li>No Orders Yet.</li>
        }
        else
        {
        <li data-role="list-divider">Order Details<span class="ui-li-count">@orders.Count</span></li>
            foreach (var order in orders)
            {
        <li><a href="@Url.Action("OrderDetail", "Order", new { id = order.Id })">
            <p>
                <strong>Ordered By : @order.Account.Name</strong>
                <br />
                [@order.ToString()]</p>
        </a></li>
            }
        }
    }
</ul>
